package com.atguigu.hellomp;

import com.atguigu.hellomp.entity.User;
import com.atguigu.hellomp.mapper.UserMapper;
import com.atguigu.hellomp.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

/**
 * author 张英杰
 * date 2025/9/29/周一 17:11
 */
@SpringBootTest
public class T1 {

    @Autowired
    UserMapper userMapper;  // 这里误报错可取消可不管

    @Autowired
    UserService userService;

    @Test
    public void a() {
        System.out.println("hello world");
        List<User> users = userMapper.selectList(null);
        System.out.println(users);
    }

    @Test
    public void b() {
        List<User> users = userMapper.selectEmail();
        System.out.println(users);
    }

    @Test
    public void c() {
        List<User> list = userService.list();
        User user = userService.getById(1);
        System.out.println(list);
        System.out.println(user);
    }
}